package fhq.hcmute.edu.vn.activities;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
import fhq.hcmute.edu.vn.languages.Language;

/**
 * @author Hien Nguyen Sep 22, 2012
 */
public class MainFunctions extends Activity {

	private TextView btnTouchPad;
	private TextView btnRemoteFile;
	private TextView btnPowerPoint;
	private TextView btnPrezi;
	private TextView btnScanner;

	@Override
	protected final void onCreate(final Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		Language.updateLanguageSystem(getBaseContext());
		setContentView(R.layout.activity_pick_functions);
		btnTouchPad = (TextView) findViewById(R.id.btnTouchPad);
		btnRemoteFile = (TextView) findViewById(R.id.btnRemoteFile);
		btnPowerPoint = (TextView) findViewById(R.id.btnPowerPoint);
		btnScanner = (TextView) findViewById(R.id.btnScanner);
		btnPrezi = (TextView) findViewById(R.id.btnPrezi);
		btnRemoteFile.setOnClickListener(onClickRemoteFile);
		btnTouchPad.setOnClickListener(onClickTouchPad);
		btnPowerPoint.setOnClickListener(onClickPowerPoint);
		btnScanner.setOnClickListener(onClickScanner);
		btnPrezi.setOnClickListener(onClickPrezi);
	}

	private View.OnClickListener onClickTouchPad =
			new View.OnClickListener() {

				@Override
				public void onClick(final View v) {
					Intent intent =
							new Intent(getApplicationContext(),
									TouchPadActivity.class);
					startActivity(intent);
				}
			};

	private View.OnClickListener onClickRemoteFile =
			new View.OnClickListener() {

				@Override
				public void onClick(View v) {
					Intent intent =
							new Intent(getApplicationContext(),
									RemoteFileActivity.class);
					startActivity(intent);
				}
			};

	private View.OnClickListener onClickPowerPoint =
			new View.OnClickListener() {

				@Override
				public void onClick(View v) {
					Toast.makeText(getApplicationContext(),
							"under construction", Toast.LENGTH_SHORT).show();
				}
			};
	private View.OnClickListener onClickPrezi =
			new View.OnClickListener() {

				@Override
				public void onClick(View v) {
					Intent intent = new Intent(getApplicationContext(),
							PreziActivity.class);
					startActivity(intent);
				}
			};
	private View.OnClickListener onClickScanner = new View.OnClickListener() {

		@Override
		public void onClick(View v) {
			Intent intent =
					new Intent(getApplicationContext(),
							ScannerActivity.class);
			startActivity(intent);

		}
	};
}
